﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp1
{
    class enumeration
    {
        enum order
        { 
           新订单 = 1,
           已发货,
           已签收,
           已评价
        }
        public static void Text1()
        {
            order or = order.新订单;
            Console.WriteLine("请输入要查询的的状况：");

            Console.WriteLine("查询新订单请输入1、查询已发货订单输入2、查询已签收订单请输入3、查看已评价商品请输入4");
            int a = Convert.ToInt32(Console.ReadLine());
        }

        enum Fruist
        {
            西瓜 = 1,
            哈密瓜,
            香蕉,
            苹果 = 3,
            奇异果 = 5,
            草莓 = 4,
            葡萄 = 6

        }
        public static void Text2()
        {
            
            Console.WriteLine("你切到几个水果？");
            int num = Convert.ToInt32(Console.ReadLine());
            int a = (int)Fruist.西瓜;
            int b = (int)Fruist.奇异果;
            int c = (int)Fruist.香蕉;
            int d = (int)Fruist.苹果;
            int e = (int)Fruist.奇异果;
            int f = (int)Fruist.草莓;
            int g = (int)Fruist.葡萄;
            int sum = 0;
            Console.WriteLine("你获得了{0}分", sum);
        }
        enum Job
        {
            战士,
            法师,
            精灵

        }
        public static void Text3()
        {
            Console.WriteLine("请输入要查询的职业：");
            string job = Console.ReadLine();
            Job job1 = (Job)Enum.Parse(typeof(Job), job);
            Test(job1);

        }
        static void Test(Job job1)
        {
            switch (job1)
            {
                case Job.战士:
                    Console.WriteLine("该职业的技能有：碎石打击、烈焰锚钩、战斗咆哮");
                    break;
                case Job.法师:
                    Console.WriteLine("该职业的技能有：巨浪冲击、元素突击、复仇杀戮");
                    break;
                case Job.精灵:
                    Console.WriteLine("该职业的技能有：减速陷阱、能量浪潮、旋风剑舞");
                    break;
                default:
                    break;
            }
        }
    }
}
